package com.linln.admin.customer.validator;

import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;
import javax.validation.constraints.Digits;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

/**
 * @author 小懒虫
 * @date 2020/04/24
 */
@Data
public class CustomerValid implements Serializable {
    @NotNull(message = "主键ID不能为空")
    private Long id;
    @NotEmpty(message = "微信不能为空")
    private String wx;
    @Digits(integer = 12, fraction = 2, message = "资金量不是数字")
    private String money;
    @Pattern(regexp = "[0-9]{4}-[0-9]{2}-[0-9]{2}", message = "日期格式不对")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date time;
}